<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0"
    />
    <script src="lib/vue.global.js"></script>
    <link rel="stylesheet" href="style.css" />
    <title>v-model</title>
  </head>
  <body>
    <div id="app">
      <div>
        <div class="input-field">
          <label for="username">用户名：</label>
          <input id="username" type="text" v-model="username" />
          <button @click="resetUsername">重置</button>
        </div>
        <div class="result">
          <p>你输入的用户名是：{{ username }}</p>
        </div>
      </div>
    </div>
    <script src="index.js"></script>
  </body>
</html>
